/*******************************************************************************
 * Copyright 2011 @ Kapil Viren Ahuja
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/
package com.kapilvirenahuja.eamsteps.dataloader;

import com.kapil.framework.exception.impl.DataProviderException;
import com.kapilvirenahuja.eamsteps.form.IDataForm;
import com.kapilvirenahuja.eamsteps.info.HeaderInfo;

/**
 * <p>
 * Interface for loading the data in a Java POJO. If the {@link IDataForm} and excel are not setup correctly, 
 * this loader will raise an {@link DataProviderException}.
 * </p>
 * 
 */
public interface IDataLoader
{
    /**
     * This method is responsible for initializing the object using reflection based on the values
     * passed.
     * 
     * 
     * @param rowId
     * @param data
     * @param header
     * @param objectInstance
     * @param form
     * @return
     */
    Object setup(String dataTableName, String rowId, String data, HeaderInfo header, Object objectInstance, final IDataForm form);
}
